<div class="form-container">
	<form id="form">
		<table class="tableform">
			<tr>
				<th style="width:70px;">新密码：</th>
				<td>
					<input id="password" name="password" class="easyui-validatebox" type="password" data-options="" style="width:180px;"/>
				</td>
			</tr>
			<tr>
				<th style="width:70px;">确认密码：</th>
				<td>
					<input name="password2" validType="equals[$('#password').val()]" invalidMessage="两次输入密码不匹配" class="easyui-validatebox" type="password" style="width:180px;"/>
				</td>
			</tr>
			<tr style="display:none">
				<td>
					<input type="hidden" name="user_ids" id="user_ids"/>
				</td>
			</tr>
		</table>
	</form>
</div>

<script>
	$(function(){
		
	});
	
	//提交表单数据
	var submitNow = function($d, $dg, flag) {
		$.post("${ctx}/manager/base/user/resetPwdBatch", $("#form").form("getData"), function(result) {
			if (result.status) {
				$dg.datagrid('reload');$.messager.alert("错误", result.message, "info");$.easyui.loaded();
				if(flag==undefined||flag==false){$d.dialog("close") ;}
			} else {
				$.easyui.loaded();$.messager.alert("错误", result.message, "error");
			}
		}, 'json').error(function() { $.easyui.loaded(); });
	};
	
	//验证表单
	var submitForm = function($d, $dg, flag) { 
		if($('#form').form('validate')) {
			$.easyui.loading({ msg: "数据提交中，请稍等..." });
			submitNow($d, $dg, flag) ;
		}
	};
</script>

